package com.xwd.domain.dto;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class BookDto{
    //properties
    /**
     * book-ID
     */
    @NotNull(message = "书籍ID不能为空")
    private Integer bookID;//参数不要使用基本数据类型
    /**
     * book-名称
     */
    @NotNull(message = "书籍名称不能为空")
    private String bookName;
    /**
     * book-数量
     */
    @NotNull(message = "书籍数量不能为空")
    @Min(value = 0,message = "书籍数量不能为负值")
    private Integer bookCounts;
    /**
     * book-描述
     */
    private String detail;
}
